export const state = () => ({
    classes: [],
    hots: [],
})

export const mutations = {
    InitClasses(state) {
        return axios
            .get("classes")
            .then((res) => {
                if (res.code != 200) {
                    return
                }
                state.classes = res.data.classes;
                state.hots = res.data.keywords;
                
            })
            .catch((err) => {
                console.error(err)
            });
    }
}